from google.appengine.ext import db

# Create your models here.

class MidLink(db.Model):
    name = db.StringProperty()
    singer = db.StringProperty()
    mid = db.IntegerProperty(default=-1)#music
    xid = db.IntegerProperty(default=-1)#xiami
    bid = db.IntegerProperty(default=-1)#baidu
    kid = db.IntegerProperty(default=-1)#kuwo
    
    add_dt = db.DateTimeProperty(auto_now=True)
    anno_genre = db.IntegerProperty(default=0)

class Genre(db.Model):
    name = gd.StringProperty()
    xid = db.IntergerProperty()
    add_dt = db.DateTimeProperty(auto_now=True)

class MusicGenreLink(db.Model):
    music = db.ReferenceProperty(MidLink)
    genre = db.ReferenceProperty(Genre)

